MODULE FU_NU_TAU_NCL
implicit none
private
public taucorrect
integer ,parameter :: nv = 5  ,mxn =9 
! nv = # of Variables in look up table.
! mxn = Max # of nodes for any single variable
! nva = # of nodes for each variables
! anodes = The values at each node in the table; for all variables

logical ichoose(nv,2**nv)
integer nva(nv),nrec
real,save:: anodes(mxn,nv)
logical :: ncllutinit = .false.

data nva  /9,7,6,4,3/ 

!1- 9 LNtau
data anodes(1:9,1) /-0.693147,0.00000,0.693147,1.38629,2.07944,2.77259,3.46574,4.15888,4.60517/
   
!2- 7 Ncloud Layers 
data anodes(1:7,2) /1,2,3,4,5,8,16/

!3- 7 Log10Nu
data anodes(1:6,3) / -0.30103, 0.0 ,0.30103, 0.69897 ,1.17609, 2.0/  !!!

!4- 4 COSSZA 
data anodes(1:4,4)/0.1, 0.3, 0.5, 0.9 /

!5- 3 Surface Albedos
data anodes(1:3,5)/0.0, 0.2, 0.4 /

real,save ::  atbl(9,7,6,4,3) , table(9*7*6*4*3)

equivalence ( atbl,table)


!Filename: laysen.calc.mult.5
!============================================================================
 !!!Ln(CldTAU):-0.693 0.000 0.693 1.386 2.079 2.773 3.466 4.159 4.852
 !!!       NCL:    1.    2.    3.    4.    5.    8.   16.
data atbl (1:9,1:7,1:6,1,1) / &
!log10(nu)-0.301   CosSol= 0.100     Salb= 0.000      Min=-0.692      Max= 0.268
 0.267, 0.268, 0.213, 0.128, 0.085, 0.064, 0.051, 0.014,-0.260,&
 0.135, 0.100, 0.053, 0.007,-0.028,-0.064,-0.106,-0.160,-0.389,&
 0.068, 0.003,-0.051,-0.077,-0.108,-0.156,-0.218,-0.285,-0.478,&
 0.019,-0.071,-0.133,-0.143,-0.169,-0.223,-0.298,-0.370,-0.515,&
-0.003,-0.105,-0.172,-0.179,-0.208,-0.271,-0.356,-0.431,-0.551,&
-0.052,-0.184,-0.267,-0.263,-0.294,-0.372,-0.475,-0.548,-0.577,&
-0.101,-0.267,-0.373,-0.364,-0.402,-0.504,-0.632,-0.692,-0.558,&
!log10(nu) 0.000   CosSol= 0.100     Salb= 0.000      Min=-0.403      Max= 0.135
 0.135, 0.115, 0.067, 0.026, 0.008,-0.003,-0.019,-0.053,-0.178,&
 0.030,-0.017,-0.048,-0.055,-0.071,-0.096,-0.122,-0.132,-0.131,&
-0.019,-0.084,-0.112,-0.103,-0.118,-0.154,-0.189,-0.191,-0.117,&
-0.051,-0.131,-0.157,-0.134,-0.149,-0.192,-0.234,-0.229,-0.092,&
-0.067,-0.153,-0.179,-0.154,-0.171,-0.220,-0.268,-0.257,-0.084,&
-0.098,-0.201,-0.228,-0.193,-0.213,-0.272,-0.330,-0.306,-0.036,&
-0.127,-0.247,-0.281,-0.238,-0.262,-0.334,-0.403,-0.359, 0.066,&
!log10(nu) 0.301   CosSol= 0.100     Salb= 0.000      Min=-0.212      Max= 0.277
 0.075, 0.052, 0.017,-0.000,-0.004,-0.007,-0.016,-0.038,-0.092,&
 0.004,-0.030,-0.043,-0.041,-0.050,-0.063,-0.065,-0.047, 0.013,&
-0.026,-0.069,-0.071,-0.060,-0.075,-0.096,-0.101,-0.064, 0.061,&
-0.045,-0.094,-0.090,-0.070,-0.088,-0.117,-0.125,-0.078, 0.103,&
-0.054,-0.106,-0.100,-0.079,-0.100,-0.132,-0.142,-0.088, 0.122,&
-0.071,-0.131,-0.122,-0.094,-0.117,-0.158,-0.175,-0.109, 0.182,&
-0.087,-0.155,-0.145,-0.112,-0.137,-0.186,-0.212,-0.131, 0.277,&
!log10(nu) 0.699   CosSol= 0.100     Salb= 0.000      Min=-0.083      Max= 0.197
 0.032, 0.016,-0.001,-0.003,-0.002,-0.003,-0.008,-0.018,-0.040,&
-0.003,-0.020,-0.020,-0.019,-0.024,-0.026,-0.021,-0.007, 0.023,&
-0.017,-0.036,-0.027,-0.025,-0.035,-0.042,-0.034,-0.007, 0.056,&
-0.025,-0.046,-0.032,-0.026,-0.041,-0.052,-0.044,-0.008, 0.085,&
-0.029,-0.051,-0.036,-0.030,-0.046,-0.059,-0.051,-0.010, 0.099,&
-0.037,-0.061,-0.042,-0.034,-0.052,-0.070,-0.066,-0.015, 0.139,&
-0.043,-0.070,-0.051,-0.039,-0.059,-0.081,-0.083,-0.024, 0.197,&
!log10(nu) 1.176   CosSol= 0.100     Salb= 0.000      Min=-0.028      Max= 0.079
 0.011, 0.004,-0.002,-0.001,-0.000,-0.001,-0.003,-0.007,-0.014,&
-0.003,-0.009,-0.007,-0.007,-0.008,-0.008,-0.006,-0.001, 0.009,&
-0.008,-0.014,-0.008,-0.009,-0.013,-0.014,-0.009, 0.001, 0.022,&
-0.011,-0.018,-0.009,-0.009,-0.015,-0.018,-0.013, 0.002, 0.033,&
-0.013,-0.019,-0.010,-0.010,-0.017,-0.020,-0.015, 0.001, 0.039,&
-0.015,-0.022,-0.012,-0.011,-0.019,-0.024,-0.020, 0.000, 0.055,&
-0.017,-0.025,-0.015,-0.013,-0.021,-0.028,-0.026,-0.002, 0.079,&
!log10(nu) 2.000   CosSol= 0.100     Salb= 0.000      Min=-0.012      Max=-0.003
-0.005,-0.006,-0.003,-0.003,-0.005,-0.006,-0.008,-0.010,-0.011,&
-0.005,-0.006,-0.004,-0.003,-0.005,-0.007,-0.008,-0.010,-0.012,&
-0.005,-0.006,-0.004,-0.003,-0.005,-0.007,-0.008,-0.010,-0.012,&
-0.005,-0.006,-0.004,-0.003,-0.005,-0.007,-0.008,-0.010,-0.012,&
-0.005,-0.006,-0.004,-0.003,-0.005,-0.007,-0.008,-0.010,-0.012,&
-0.005,-0.006,-0.004,-0.003,-0.005,-0.007,-0.008,-0.010,-0.012,&
-0.005,-0.006,-0.004,-0.003,-0.005,-0.007,-0.008,-0.010,-0.012/
data atbl (1:9,1:7,1:6,2,1) / &
!log10(nu)-0.301   CosSol= 0.300     Salb= 0.000      Min=-0.615      Max= 0.209
 0.209, 0.167, 0.147, 0.130, 0.103, 0.086, 0.075, 0.042,-0.222,&
 0.132, 0.081, 0.051, 0.027, 0.003,-0.021,-0.048,-0.083,-0.284,&
 0.097, 0.039,-0.003,-0.038,-0.068,-0.103,-0.146,-0.189,-0.347,&
 0.075, 0.009,-0.043,-0.088,-0.125,-0.168,-0.221,-0.264,-0.366,&
 0.063,-0.006,-0.063,-0.117,-0.160,-0.213,-0.279,-0.328,-0.408,&
 0.041,-0.036,-0.108,-0.180,-0.239,-0.313,-0.401,-0.451,-0.440,&
 0.021,-0.066,-0.154,-0.251,-0.336,-0.444,-0.567,-0.615,-0.448,&
!log10(nu) 0.000   CosSol= 0.300     Salb= 0.000      Min=-0.373      Max= 0.108
 0.108, 0.087, 0.073, 0.058, 0.038, 0.021, 0.001,-0.037,-0.166,&
 0.052, 0.021,-0.003,-0.022,-0.039,-0.061,-0.086,-0.101,-0.114,&
 0.029,-0.009,-0.042,-0.068,-0.088,-0.116,-0.148,-0.153,-0.097,&
 0.014,-0.029,-0.069,-0.100,-0.121,-0.154,-0.190,-0.184,-0.064,&
 0.007,-0.039,-0.083,-0.118,-0.145,-0.184,-0.225,-0.216,-0.063,&
-0.006,-0.058,-0.111,-0.156,-0.191,-0.241,-0.290,-0.266,-0.016,&
-0.018,-0.076,-0.139,-0.197,-0.245,-0.311,-0.373,-0.327, 0.078,&
!log10(nu) 0.301   CosSol= 0.300     Salb= 0.000      Min=-0.191      Max= 0.242
 0.062, 0.050, 0.040, 0.027, 0.014, 0.003,-0.011,-0.037,-0.095,&
 0.026, 0.007,-0.010,-0.022,-0.032,-0.047,-0.056,-0.048,-0.004,&
 0.012,-0.012,-0.034,-0.047,-0.057,-0.076,-0.088,-0.064, 0.038,&
 0.004,-0.023,-0.049,-0.064,-0.073,-0.094,-0.107,-0.073, 0.078,&
-0.000,-0.029,-0.058,-0.074,-0.086,-0.110,-0.125,-0.085, 0.093,&
-0.007,-0.040,-0.073,-0.094,-0.109,-0.137,-0.154,-0.102, 0.148,&
-0.014,-0.050,-0.089,-0.116,-0.135,-0.170,-0.191,-0.119, 0.242,&
!log10(nu) 0.699   CosSol= 0.300     Salb= 0.000      Min=-0.073      Max= 0.164
 0.028, 0.022, 0.016, 0.009, 0.003,-0.001,-0.007,-0.019,-0.042,&
 0.011, 0.001,-0.007,-0.011,-0.016,-0.023,-0.022,-0.011, 0.013,&
 0.004,-0.008,-0.018,-0.021,-0.026,-0.036,-0.034,-0.012, 0.042,&
 0.001,-0.013,-0.025,-0.028,-0.031,-0.042,-0.042,-0.013, 0.067,&
-0.001,-0.015,-0.029,-0.032,-0.036,-0.049,-0.049,-0.016, 0.079,&
-0.004,-0.020,-0.035,-0.040,-0.044,-0.058,-0.060,-0.021, 0.113,&
-0.007,-0.024,-0.042,-0.049,-0.054,-0.071,-0.073,-0.026, 0.164,&
!log10(nu) 1.176   CosSol= 0.300     Salb= 0.000      Min=-0.024      Max= 0.066
 0.010, 0.008, 0.005, 0.003, 0.001,-0.001,-0.003,-0.007,-0.015,&
 0.003,-0.001,-0.004,-0.004,-0.006,-0.008,-0.006,-0.002, 0.006,&
 0.001,-0.004,-0.008,-0.007,-0.009,-0.013,-0.010,-0.001, 0.017,&
-0.000,-0.006,-0.010,-0.009,-0.010,-0.015,-0.013,-0.001, 0.027,&
-0.001,-0.006,-0.011,-0.011,-0.012,-0.017,-0.015,-0.001, 0.031,&
-0.002,-0.008,-0.013,-0.014,-0.015,-0.020,-0.019,-0.002, 0.046,&
-0.003,-0.009,-0.016,-0.016,-0.018,-0.024,-0.023,-0.004, 0.066,&
!log10(nu) 2.000   CosSol= 0.300     Salb= 0.000      Min=-0.012      Max=-0.002
-0.002,-0.003,-0.004,-0.004,-0.005,-0.006,-0.008,-0.010,-0.011,&
-0.002,-0.003,-0.004,-0.005,-0.005,-0.006,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.004,-0.005,-0.005,-0.006,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.004,-0.005,-0.005,-0.006,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.004,-0.005,-0.005,-0.007,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.004,-0.005,-0.005,-0.007,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.004,-0.005,-0.005,-0.007,-0.008,-0.010,-0.012/
data atbl (1:9,1:7,1:6,3,1) / &
!log10(nu)-0.301   CosSol= 0.500     Salb= 0.000      Min=-0.612      Max= 0.191
 0.191, 0.145, 0.116, 0.099, 0.087, 0.080, 0.075, 0.047,-0.202,&
 0.137, 0.086, 0.052, 0.028, 0.008,-0.013,-0.036,-0.069,-0.271,&
 0.115, 0.059, 0.018,-0.015,-0.047,-0.083,-0.126,-0.172,-0.343,&
 0.101, 0.041,-0.005,-0.046,-0.089,-0.139,-0.197,-0.250,-0.378,&
 0.093, 0.031,-0.019,-0.066,-0.118,-0.180,-0.252,-0.314,-0.429,&
 0.079, 0.012,-0.045,-0.105,-0.177,-0.266,-0.368,-0.442,-0.490,&
 0.066,-0.005,-0.071,-0.148,-0.248,-0.376,-0.522,-0.612,-0.541,&
!log10(nu) 0.000   CosSol= 0.500     Salb= 0.000      Min=-0.366      Max= 0.092
 0.092, 0.073, 0.060, 0.050, 0.040, 0.030, 0.014,-0.020,-0.144,&
 0.056, 0.031, 0.010,-0.007,-0.025,-0.046,-0.070,-0.087,-0.111,&
 0.042, 0.012,-0.014,-0.038,-0.066,-0.099,-0.132,-0.143,-0.106,&
 0.033, 0.001,-0.029,-0.060,-0.094,-0.136,-0.176,-0.179,-0.086,&
 0.028,-0.006,-0.038,-0.073,-0.115,-0.164,-0.211,-0.214,-0.093,&
 0.020,-0.017,-0.055,-0.098,-0.153,-0.219,-0.280,-0.274,-0.069,&
 0.013,-0.027,-0.070,-0.124,-0.195,-0.284,-0.366,-0.350,-0.013,&
!log10(nu) 0.301   CosSol= 0.500     Salb= 0.000      Min=-0.195      Max= 0.187
 0.051, 0.041, 0.034, 0.027, 0.020, 0.011,-0.003,-0.028,-0.087,&
 0.029, 0.015, 0.002,-0.010,-0.023,-0.037,-0.049,-0.045,-0.012,&
 0.021, 0.004,-0.013,-0.029,-0.047,-0.068,-0.081,-0.064, 0.022,&
 0.016,-0.003,-0.022,-0.041,-0.063,-0.087,-0.101,-0.074, 0.057,&
 0.013,-0.006,-0.027,-0.049,-0.075,-0.103,-0.120,-0.088, 0.067,&
 0.009,-0.013,-0.037,-0.064,-0.096,-0.132,-0.153,-0.109, 0.112,&
 0.005,-0.018,-0.045,-0.078,-0.119,-0.166,-0.195,-0.136, 0.187,&
!log10(nu) 0.699   CosSol= 0.500     Salb= 0.000      Min=-0.075      Max= 0.138
 0.022, 0.018, 0.015, 0.011, 0.007, 0.003,-0.005,-0.017,-0.040,&
 0.012, 0.006,-0.000,-0.006,-0.012,-0.019,-0.020,-0.012, 0.008,&
 0.008, 0.001,-0.007,-0.015,-0.023,-0.031,-0.032,-0.014, 0.033,&
 0.006,-0.002,-0.011,-0.020,-0.029,-0.039,-0.039,-0.015, 0.055,&
 0.005,-0.004,-0.014,-0.024,-0.034,-0.046,-0.047,-0.019, 0.064,&
 0.003,-0.006,-0.018,-0.030,-0.043,-0.057,-0.059,-0.024, 0.093,&
 0.002,-0.009,-0.021,-0.036,-0.052,-0.071,-0.075,-0.031, 0.138,&
!log10(nu) 1.176   CosSol= 0.500     Salb= 0.000      Min=-0.024      Max= 0.056
 0.008, 0.006, 0.005, 0.004, 0.002, 0.000,-0.002,-0.006,-0.014,&
 0.004, 0.002,-0.001,-0.003,-0.005,-0.007,-0.006,-0.002, 0.004,&
 0.003,-0.000,-0.003,-0.006,-0.008,-0.011,-0.010,-0.002, 0.014,&
 0.002,-0.001,-0.005,-0.008,-0.010,-0.013,-0.012,-0.002, 0.022,&
 0.002,-0.002,-0.005,-0.009,-0.012,-0.016,-0.015,-0.003, 0.026,&
 0.001,-0.003,-0.007,-0.011,-0.015,-0.020,-0.019,-0.004, 0.038,&
 0.000,-0.003,-0.008,-0.013,-0.018,-0.024,-0.024,-0.006, 0.056,&
!log10(nu) 2.000   CosSol= 0.500     Salb= 0.000      Min=-0.012      Max=-0.001
-0.001,-0.002,-0.003,-0.004,-0.005,-0.006,-0.008,-0.009,-0.011,&
-0.001,-0.002,-0.003,-0.004,-0.005,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.005,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.005,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.005,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.005,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.005,-0.006,-0.008,-0.010,-0.012/
data atbl (1:9,1:7,1:6,4,1) / &
!log10(nu)-0.301   CosSol= 0.900     Salb= 0.000      Min=-0.806      Max= 0.177
 0.177, 0.128, 0.096, 0.075, 0.063, 0.062, 0.065, 0.048,-0.172,&
 0.171, 0.115, 0.074, 0.041, 0.016,-0.005,-0.030,-0.072,-0.289,&
 0.170, 0.111, 0.064, 0.021,-0.017,-0.057,-0.108,-0.177,-0.399,&
 0.168, 0.108, 0.057, 0.008,-0.040,-0.096,-0.170,-0.260,-0.477,&
 0.168, 0.107, 0.053,-0.002,-0.058,-0.127,-0.218,-0.326,-0.548,&
 0.167, 0.104, 0.046,-0.018,-0.092,-0.188,-0.318,-0.461,-0.672,&
 0.166, 0.103, 0.040,-0.035,-0.129,-0.262,-0.444,-0.632,-0.806,&
!log10(nu) 0.000   CosSol= 0.900     Salb= 0.000      Min=-0.416      Max= 0.076
 0.076, 0.057, 0.047, 0.039, 0.034, 0.031, 0.024, 0.001,-0.109,&
 0.073, 0.051, 0.033, 0.013,-0.008,-0.031,-0.058,-0.083,-0.129,&
 0.073, 0.049, 0.026,-0.001,-0.034,-0.074,-0.119,-0.152,-0.164,&
 0.072, 0.046, 0.022,-0.010,-0.051,-0.104,-0.164,-0.202,-0.183,&
 0.072, 0.046, 0.021,-0.016,-0.064,-0.128,-0.199,-0.243,-0.210,&
 0.072, 0.045, 0.017,-0.026,-0.087,-0.170,-0.266,-0.321,-0.244,&
 0.071, 0.044, 0.013,-0.035,-0.109,-0.217,-0.345,-0.416,-0.272,&
!log10(nu) 0.301   CosSol= 0.900     Salb= 0.000      Min=-0.206      Max= 0.037
 0.037, 0.029, 0.025, 0.023, 0.020, 0.017, 0.008,-0.014,-0.068,&
 0.037, 0.027, 0.018, 0.006,-0.010,-0.028,-0.043,-0.046,-0.027,&
 0.037, 0.026, 0.015,-0.003,-0.028,-0.057,-0.079,-0.075,-0.014,&
 0.036, 0.024, 0.011,-0.008,-0.038,-0.076,-0.105,-0.096,-0.001,&
 0.036, 0.025, 0.012,-0.011,-0.047,-0.090,-0.125,-0.115,-0.003,&
 0.036, 0.024, 0.010,-0.017,-0.060,-0.116,-0.163,-0.151, 0.007,&
 0.036, 0.024, 0.008,-0.022,-0.072,-0.142,-0.206,-0.197, 0.024,&
!log10(nu) 0.699   CosSol= 0.900     Salb= 0.000      Min=-0.086      Max= 0.071
 0.015, 0.012, 0.011, 0.010, 0.009, 0.007, 0.000,-0.011,-0.034,&
 0.015, 0.011, 0.008, 0.002,-0.007,-0.016,-0.019,-0.013, 0.002,&
 0.015, 0.011, 0.007,-0.002,-0.015,-0.029,-0.033,-0.020, 0.018,&
 0.015, 0.011, 0.003,-0.005,-0.020,-0.038,-0.043,-0.024, 0.033,&
 0.015, 0.011, 0.006,-0.005,-0.024,-0.045,-0.052,-0.030, 0.037,&
 0.015, 0.010, 0.005,-0.008,-0.030,-0.056,-0.068,-0.042, 0.053,&
 0.015, 0.010, 0.004,-0.010,-0.035,-0.067,-0.086,-0.060, 0.071,&
!log10(nu) 1.176   CosSol= 0.900     Salb= 0.000      Min=-0.028      Max= 0.034
 0.005, 0.004, 0.004, 0.004, 0.003, 0.002,-0.000,-0.005,-0.012,&
 0.005, 0.004, 0.003, 0.001,-0.003,-0.006,-0.006,-0.003, 0.002,&
 0.005, 0.004, 0.003,-0.000,-0.006,-0.011,-0.010,-0.004, 0.009,&
 0.005, 0.004,-0.000,-0.002,-0.007,-0.014,-0.014,-0.005, 0.015,&
 0.005, 0.004, 0.002,-0.002,-0.009,-0.016,-0.016,-0.006, 0.017,&
 0.005, 0.004, 0.002,-0.002,-0.011,-0.020,-0.022,-0.010, 0.025,&
 0.005, 0.004, 0.002,-0.003,-0.013,-0.024,-0.028,-0.016, 0.034,&
!log10(nu) 2.000   CosSol= 0.900     Salb= 0.000      Min=-0.012      Max= 0.000
 0.000,-0.000,-0.001,-0.002,-0.004,-0.006,-0.008,-0.009,-0.011,&
 0.000,-0.000,-0.001,-0.002,-0.004,-0.006,-0.008,-0.010,-0.012,&
 0.000,-0.000,-0.001,-0.002,-0.004,-0.006,-0.008,-0.010,-0.012,&
 0.000,-0.000,-0.001,-0.002,-0.004,-0.006,-0.008,-0.010,-0.012,&
 0.000,-0.000,-0.005,-0.002,-0.004,-0.006,-0.008,-0.010,-0.012,&
 0.000, 0.000,-0.001,-0.002,-0.004,-0.006,-0.008,-0.010,-0.012,&
 0.000,-0.000,-0.000,-0.002,-0.004,-0.006,-0.008,-0.010,-0.012/
data atbl (1:9,1:7,1:6,1,2) / &
!log10(nu)-0.301   CosSol= 0.100     Salb= 0.200      Min=-0.409      Max= 0.235
 0.226, 0.235, 0.204, 0.139, 0.111, 0.110, 0.131, 0.158, 0.029,&
 0.110, 0.083, 0.058, 0.038, 0.027, 0.023, 0.034, 0.077, 0.074,&
 0.045,-0.014,-0.049,-0.043,-0.043,-0.052,-0.052,-0.010, 0.051,&
-0.002,-0.090,-0.138,-0.111,-0.101,-0.111,-0.118,-0.071, 0.056,&
-0.023,-0.123,-0.178,-0.147,-0.137,-0.153,-0.165,-0.115, 0.048,&
-0.071,-0.205,-0.280,-0.235,-0.221,-0.246,-0.268,-0.205, 0.071,&
-0.119,-0.291,-0.397,-0.343,-0.331,-0.371,-0.409,-0.319, 0.136,&
!log10(nu) 0.000   CosSol= 0.100     Salb= 0.200      Min=-0.303      Max= 0.315
 0.110, 0.093, 0.056, 0.030, 0.026, 0.030, 0.032, 0.022,-0.064,&
 0.015,-0.031,-0.053,-0.040,-0.036,-0.042,-0.045,-0.023, 0.036,&
-0.032,-0.099,-0.119,-0.085,-0.079,-0.093,-0.102,-0.068, 0.070,&
-0.064,-0.147,-0.168,-0.117,-0.107,-0.127,-0.141,-0.097, 0.109,&
-0.078,-0.169,-0.191,-0.137,-0.129,-0.153,-0.170,-0.119, 0.126,&
-0.109,-0.218,-0.245,-0.177,-0.169,-0.201,-0.225,-0.157, 0.192,&
-0.138,-0.267,-0.303,-0.225,-0.217,-0.260,-0.292,-0.197, 0.315,&
!log10(nu) 0.301   CosSol= 0.100     Salb= 0.200      Min=-0.168      Max= 0.357
 0.060, 0.038, 0.008, 0.001, 0.007, 0.012, 0.008,-0.010,-0.061,&
-0.004,-0.039,-0.047,-0.032,-0.031,-0.034,-0.030,-0.007, 0.059,&
-0.033,-0.078,-0.076,-0.049,-0.053,-0.064,-0.061,-0.019, 0.114,&
-0.052,-0.104,-0.096,-0.059,-0.064,-0.083,-0.083,-0.029, 0.161,&
-0.060,-0.117,-0.107,-0.067,-0.075,-0.098,-0.099,-0.037, 0.184,&
-0.078,-0.142,-0.130,-0.082,-0.092,-0.122,-0.129,-0.053, 0.252,&
-0.094,-0.168,-0.156,-0.101,-0.111,-0.148,-0.162,-0.069, 0.357,&
!log10(nu) 0.699   CosSol= 0.100     Salb= 0.200      Min=-0.076      Max= 0.220
 0.026, 0.010,-0.006,-0.003, 0.003, 0.005, 0.000,-0.011,-0.035,&
-0.006,-0.024,-0.022,-0.014,-0.015,-0.015,-0.009, 0.003, 0.033,&
-0.020,-0.040,-0.029,-0.019,-0.026,-0.029,-0.021, 0.005, 0.068,&
-0.028,-0.051,-0.034,-0.020,-0.031,-0.039,-0.030, 0.005, 0.098,&
-0.032,-0.056,-0.037,-0.023,-0.035,-0.045,-0.037, 0.004, 0.113,&
-0.039,-0.066,-0.045,-0.026,-0.041,-0.056,-0.051, 0.001, 0.157,&
-0.046,-0.076,-0.054,-0.033,-0.047,-0.066,-0.066,-0.006, 0.220,&
!log10(nu) 1.176   CosSol= 0.100     Salb= 0.200      Min=-0.028      Max= 0.086
 0.009, 0.002,-0.004,-0.001, 0.002, 0.001,-0.001,-0.005,-0.013,&
-0.004,-0.011,-0.007,-0.005,-0.005,-0.005,-0.002, 0.002, 0.011,&
-0.009,-0.016,-0.009,-0.007,-0.009,-0.010,-0.006, 0.004, 0.025,&
-0.012,-0.019,-0.009,-0.006,-0.012,-0.013,-0.009, 0.005, 0.036,&
-0.013,-0.021,-0.010,-0.007,-0.013,-0.016,-0.011, 0.005, 0.042,&
-0.016,-0.024,-0.013,-0.008,-0.015,-0.020,-0.016, 0.005, 0.060,&
-0.018,-0.028,-0.015,-0.010,-0.017,-0.023,-0.022, 0.003, 0.086,&
!log10(nu) 2.000   CosSol= 0.100     Salb= 0.200      Min=-0.012      Max=-0.003
-0.005,-0.006,-0.004,-0.003,-0.004,-0.006,-0.008,-0.009,-0.011,&
-0.005,-0.007,-0.004,-0.003,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.005,-0.007,-0.004,-0.003,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.005,-0.007,-0.004,-0.003,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.005,-0.007,-0.004,-0.003,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.005,-0.007,-0.004,-0.003,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.005,-0.007,-0.004,-0.003,-0.004,-0.006,-0.008,-0.010,-0.012/
data atbl (1:9,1:7,1:6,2,2) / &
!log10(nu)-0.301   CosSol= 0.300     Salb= 0.200      Min=-0.335      Max= 0.241
 0.195, 0.166, 0.161, 0.162, 0.147, 0.146, 0.167, 0.196, 0.072,&
 0.128, 0.089, 0.075, 0.076, 0.074, 0.078, 0.101, 0.158, 0.175,&
 0.095, 0.048, 0.023, 0.015, 0.012, 0.012, 0.028, 0.091, 0.177,&
 0.073, 0.018,-0.017,-0.034,-0.039,-0.043,-0.033, 0.039, 0.199,&
 0.063, 0.004,-0.036,-0.061,-0.072,-0.083,-0.080,-0.008, 0.185,&
 0.041,-0.026,-0.081,-0.124,-0.147,-0.174,-0.185,-0.102, 0.202,&
 0.021,-0.056,-0.129,-0.196,-0.243,-0.297,-0.335,-0.237, 0.241,&
!log10(nu) 0.000   CosSol= 0.300     Salb= 0.200      Min=-0.259      Max= 0.320
 0.102, 0.089, 0.084, 0.079, 0.068, 0.061, 0.056, 0.040,-0.054,&
 0.051, 0.027, 0.012, 0.008, 0.006,-0.001,-0.006, 0.009, 0.048,&
 0.028,-0.003,-0.026,-0.035,-0.038,-0.049,-0.057,-0.030, 0.085,&
 0.014,-0.023,-0.053,-0.067,-0.070,-0.083,-0.093,-0.052, 0.131,&
 0.007,-0.033,-0.067,-0.085,-0.092,-0.110,-0.124,-0.077, 0.141,&
-0.006,-0.052,-0.096,-0.124,-0.137,-0.163,-0.182,-0.117, 0.206,&
-0.018,-0.071,-0.125,-0.167,-0.191,-0.230,-0.259,-0.166, 0.320,&
!log10(nu) 0.301   CosSol= 0.300     Salb= 0.200      Min=-0.141      Max= 0.318
 0.059, 0.052, 0.046, 0.039, 0.031, 0.024, 0.014,-0.009,-0.066,&
 0.026, 0.010,-0.001,-0.005,-0.008,-0.016,-0.021,-0.009, 0.039,&
 0.013,-0.008,-0.025,-0.029,-0.030,-0.043,-0.048,-0.020, 0.088,&
 0.004,-0.020,-0.041,-0.046,-0.045,-0.058,-0.065,-0.026, 0.132,&
 0.000,-0.026,-0.050,-0.056,-0.057,-0.073,-0.081,-0.035, 0.151,&
-0.007,-0.037,-0.066,-0.077,-0.079,-0.098,-0.107,-0.047, 0.214,&
-0.014,-0.047,-0.082,-0.099,-0.106,-0.130,-0.141,-0.059, 0.318,&
!log10(nu) 0.699   CosSol= 0.300     Salb= 0.200      Min=-0.057      Max= 0.185
 0.027, 0.023, 0.019, 0.014, 0.010, 0.007, 0.001,-0.012,-0.037,&
 0.011, 0.003,-0.004,-0.004,-0.006,-0.011,-0.010,-0.001, 0.022,&
 0.005,-0.006,-0.015,-0.014,-0.014,-0.023,-0.021,-0.000, 0.053,&
 0.001,-0.011,-0.022,-0.020,-0.019,-0.028,-0.028,-0.000, 0.079,&
-0.001,-0.014,-0.025,-0.024,-0.024,-0.035,-0.035,-0.002, 0.092,&
-0.004,-0.019,-0.033,-0.033,-0.032,-0.044,-0.045,-0.006, 0.129,&
-0.007,-0.023,-0.039,-0.042,-0.042,-0.055,-0.057,-0.008, 0.185,&
!log10(nu) 1.176   CosSol= 0.300     Salb= 0.200      Min=-0.019      Max= 0.071
 0.009, 0.008, 0.006, 0.004, 0.003, 0.002,-0.001,-0.005,-0.014,&
 0.003, 0.000,-0.003,-0.002,-0.003,-0.004,-0.003, 0.001, 0.008,&
 0.001,-0.003,-0.006,-0.005,-0.005,-0.009,-0.006, 0.002, 0.019,&
-0.000,-0.005,-0.009,-0.007,-0.006,-0.011,-0.009, 0.003, 0.030,&
-0.001,-0.006,-0.010,-0.008,-0.008,-0.013,-0.011, 0.002, 0.035,&
-0.002,-0.008,-0.013,-0.011,-0.010,-0.016,-0.015, 0.002, 0.050,&
-0.003,-0.009,-0.015,-0.014,-0.014,-0.019,-0.019, 0.001, 0.071,&
!log10(nu) 2.000   CosSol= 0.300     Salb= 0.200      Min=-0.012      Max=-0.002
-0.002,-0.003,-0.004,-0.004,-0.004,-0.006,-0.008,-0.009,-0.011,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012/
data atbl (1:9,1:7,1:6,3,2) / &
!log10(nu)-0.301   CosSol= 0.500     Salb= 0.200      Min=-0.300      Max= 0.198
 0.174, 0.148, 0.133, 0.130, 0.131, 0.140, 0.166, 0.198, 0.082,&
 0.137, 0.101, 0.082, 0.076, 0.076, 0.083, 0.107, 0.161, 0.164,&
 0.119, 0.077, 0.052, 0.039, 0.031, 0.028, 0.040, 0.094, 0.152,&
 0.106, 0.060, 0.030, 0.011,-0.006,-0.019,-0.017, 0.039, 0.157,&
 0.100, 0.052, 0.018,-0.006,-0.030,-0.054,-0.061,-0.010, 0.132,&
 0.089, 0.035,-0.006,-0.043,-0.085,-0.131,-0.161,-0.112, 0.116,&
 0.078, 0.018,-0.031,-0.084,-0.152,-0.233,-0.300,-0.254, 0.109,&
!log10(nu) 0.000   CosSol= 0.500     Salb= 0.200      Min=-0.254      Max= 0.220
 0.085, 0.078, 0.074, 0.073, 0.073, 0.072, 0.071, 0.058,-0.033,&
 0.057, 0.041, 0.031, 0.026, 0.021, 0.014, 0.010, 0.021, 0.048,&
 0.045, 0.024, 0.008,-0.003,-0.015,-0.031,-0.042,-0.022, 0.070,&
 0.037, 0.013,-0.007,-0.023,-0.041,-0.064,-0.080,-0.050, 0.104,&
 0.033, 0.007,-0.015,-0.035,-0.060,-0.090,-0.111,-0.079, 0.105,&
 0.026,-0.004,-0.031,-0.060,-0.096,-0.141,-0.173,-0.129, 0.145,&
 0.019,-0.013,-0.047,-0.085,-0.138,-0.203,-0.254,-0.194, 0.220,&
!log10(nu) 0.301   CosSol= 0.500     Salb= 0.200      Min=-0.145      Max= 0.259
 0.047, 0.045, 0.043, 0.042, 0.040, 0.034, 0.024, 0.000,-0.057,&
 0.030, 0.021, 0.014, 0.010, 0.004,-0.006,-0.013,-0.006, 0.031,&
 0.023, 0.011,-0.000,-0.008,-0.018,-0.033,-0.041,-0.020, 0.071,&
 0.018, 0.004,-0.009,-0.020,-0.033,-0.050,-0.058,-0.027, 0.110,&
 0.016, 0.001,-0.014,-0.028,-0.045,-0.066,-0.076,-0.039, 0.123,&
 0.012,-0.005,-0.023,-0.042,-0.065,-0.093,-0.106,-0.055, 0.175,&
 0.008,-0.011,-0.032,-0.056,-0.087,-0.126,-0.145,-0.077, 0.259,&
!log10(nu) 0.699   CosSol= 0.500     Salb= 0.200      Min=-0.059      Max= 0.157
 0.021, 0.020, 0.019, 0.018, 0.016, 0.012, 0.004,-0.010,-0.035,&
 0.013, 0.009, 0.005, 0.002,-0.001,-0.007,-0.008,-0.002, 0.017,&
 0.009, 0.004,-0.002,-0.006,-0.011,-0.018,-0.019,-0.003, 0.043,&
 0.007, 0.001,-0.006,-0.011,-0.017,-0.025,-0.025,-0.003, 0.066,&
 0.007,-0.001,-0.008,-0.015,-0.022,-0.031,-0.032,-0.006, 0.077,&
 0.005,-0.003,-0.012,-0.021,-0.030,-0.042,-0.044,-0.010, 0.109,&
 0.003,-0.006,-0.016,-0.027,-0.039,-0.055,-0.059,-0.015, 0.157,&
!log10(nu) 1.176   CosSol= 0.500     Salb= 0.200      Min=-0.019      Max= 0.061
 0.007, 0.007, 0.007, 0.006, 0.005, 0.003, 0.000,-0.005,-0.013,&
 0.004, 0.003, 0.001, 0.000,-0.001,-0.003,-0.003,-0.000, 0.006,&
 0.003, 0.001,-0.001,-0.003,-0.004,-0.007,-0.006, 0.001, 0.016,&
 0.002,-0.000,-0.003,-0.004,-0.006,-0.009,-0.008, 0.001, 0.025,&
 0.002,-0.001,-0.003,-0.006,-0.008,-0.011,-0.011, 0.001, 0.030,&
 0.001,-0.001,-0.005,-0.008,-0.011,-0.015,-0.014,-0.000, 0.042,&
 0.001,-0.002,-0.006,-0.010,-0.014,-0.019,-0.019,-0.001, 0.061,&
!log10(nu) 2.000   CosSol= 0.500     Salb= 0.200      Min=-0.012      Max=-0.001
-0.001,-0.002,-0.003,-0.004,-0.004,-0.006,-0.008,-0.009,-0.011,&
-0.001,-0.002,-0.003,-0.004,-0.004,-0.006,-0.008,-0.009,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012,&
-0.001,-0.002,-0.003,-0.004,-0.004,-0.006,-0.008,-0.010,-0.012/
data atbl (1:9,1:7,1:6,4,2) / &
!log10(nu)-0.301   CosSol= 0.900     Salb= 0.200      Min=-0.324      Max= 0.249
 0.108, 0.119, 0.116, 0.105, 0.101, 0.113, 0.144, 0.181, 0.083,&
 0.182, 0.154, 0.126, 0.097, 0.078, 0.077, 0.093, 0.128, 0.093,&
 0.204, 0.167, 0.129, 0.088, 0.057, 0.039, 0.035, 0.054, 0.034,&
 0.216, 0.176, 0.130, 0.082, 0.040, 0.008,-0.015,-0.010,-0.011,&
 0.225, 0.179, 0.130, 0.076, 0.026,-0.017,-0.054,-0.063,-0.060,&
 0.237, 0.186, 0.131, 0.066,-0.000,-0.069,-0.140,-0.175,-0.147,&
 0.249, 0.194, 0.133, 0.056,-0.030,-0.134,-0.252,-0.324,-0.244,&
!log10(nu) 0.000   CosSol= 0.900     Salb= 0.200      Min=-0.276      Max= 0.118
 0.035, 0.052, 0.061, 0.063, 0.064, 0.070, 0.078, 0.075,-0.001,&
 0.081, 0.075, 0.068, 0.053, 0.036, 0.024, 0.016, 0.018, 0.019,&
 0.093, 0.083, 0.069, 0.045, 0.016,-0.012,-0.037,-0.040, 0.000,&
 0.101, 0.088, 0.070, 0.041, 0.003,-0.038,-0.077,-0.083,-0.008,&
 0.105, 0.090, 0.070, 0.036,-0.009,-0.060,-0.108,-0.119,-0.028,&
 0.111, 0.094, 0.071, 0.029,-0.028,-0.098,-0.170,-0.189,-0.049,&
 0.118, 0.098, 0.071, 0.023,-0.047,-0.142,-0.243,-0.276,-0.063,&
!log10(nu) 0.301   CosSol= 0.900     Salb= 0.200      Min=-0.160      Max= 0.088
 0.015, 0.027, 0.035, 0.039, 0.040, 0.040, 0.035, 0.016,-0.038,&
 0.041, 0.041, 0.039, 0.030, 0.016, 0.003,-0.007,-0.008, 0.015,&
 0.048, 0.045, 0.040, 0.025, 0.002,-0.023,-0.040,-0.033, 0.033,&
 0.053, 0.048, 0.041, 0.022,-0.007,-0.040,-0.064,-0.051, 0.049,&
 0.054, 0.049, 0.040, 0.019,-0.015,-0.054,-0.083,-0.068, 0.050,&
 0.057, 0.051, 0.041, 0.016,-0.026,-0.078,-0.119,-0.101, 0.066,&
 0.061, 0.053, 0.041, 0.012,-0.037,-0.103,-0.160,-0.143, 0.088,&
!log10(nu) 0.699   CosSol= 0.900     Salb= 0.200      Min=-0.071      Max= 0.088
 0.005, 0.011, 0.015, 0.018, 0.018, 0.017, 0.010,-0.004,-0.029,&
 0.017, 0.018, 0.018, 0.013, 0.005,-0.003,-0.007,-0.003, 0.010,&
 0.020, 0.020, 0.018, 0.011,-0.002,-0.016,-0.020,-0.008, 0.028,&
 0.024, 0.021, 0.018, 0.010,-0.006,-0.024,-0.030,-0.012, 0.044,&
 0.023, 0.021, 0.018, 0.008,-0.010,-0.031,-0.038,-0.018, 0.049,&
 0.024, 0.022, 0.019, 0.007,-0.015,-0.041,-0.053,-0.029, 0.066,&
 0.026, 0.023, 0.019, 0.005,-0.020,-0.052,-0.071,-0.045, 0.088,&
!log10(nu) 1.176   CosSol= 0.900     Salb= 0.200      Min=-0.024      Max= 0.038
 0.002, 0.004, 0.005, 0.006, 0.007, 0.005, 0.002,-0.003,-0.011,&
 0.006, 0.006, 0.007, 0.005, 0.002,-0.002,-0.002,-0.001, 0.004,&
 0.007, 0.007, 0.007, 0.004,-0.001,-0.007,-0.007,-0.001, 0.011,&
 0.010, 0.007, 0.007, 0.004,-0.003,-0.009,-0.010,-0.002, 0.018,&
 0.008, 0.008, 0.007, 0.003,-0.004,-0.012,-0.012,-0.003, 0.020,&
 0.008, 0.008, 0.007, 0.003,-0.006,-0.016,-0.018,-0.006, 0.028,&
 0.009, 0.008, 0.007, 0.002,-0.008,-0.019,-0.024,-0.011, 0.038,&
!log10(nu) 2.000   CosSol= 0.900     Salb= 0.200      Min=-0.012      Max= 0.001
 0.001, 0.000, 0.000,-0.001,-0.003,-0.006,-0.008,-0.009,-0.011,&
-0.000, 0.000, 0.000,-0.001,-0.003,-0.006,-0.008,-0.009,-0.011,&
 0.001, 0.000, 0.000,-0.001,-0.003,-0.006,-0.008,-0.010,-0.012,&
 0.001, 0.000, 0.000,-0.001,-0.003,-0.006,-0.008,-0.010,-0.012,&
 0.001, 0.000,-0.002,-0.001,-0.003,-0.006,-0.008,-0.010,-0.012,&
 0.000, 0.001, 0.000,-0.001,-0.003,-0.006,-0.008,-0.010,-0.012,&
 0.001, 0.000, 0.000,-0.001,-0.003,-0.006,-0.008,-0.010,-0.012/
data atbl (1:9,1:7,1:6,1,3) / &
!log10(nu)-0.301   CosSol= 0.100     Salb= 0.400      Min=-0.461      Max= 0.968
 0.158, 0.164, 0.156, 0.126, 0.123, 0.145, 0.197, 0.283, 0.296,&
 0.067, 0.038, 0.034, 0.057, 0.083, 0.115, 0.179, 0.320, 0.559,&
 0.007,-0.056,-0.077,-0.021, 0.025, 0.061, 0.127, 0.287, 0.629,&
-0.038,-0.133,-0.174,-0.092,-0.028, 0.014, 0.081, 0.259, 0.694,&
-0.057,-0.164,-0.216,-0.127,-0.060,-0.019, 0.049, 0.240, 0.729,&
-0.103,-0.247,-0.329,-0.223,-0.142,-0.100,-0.030, 0.192, 0.827,&
-0.149,-0.335,-0.461,-0.343,-0.254,-0.217,-0.147, 0.124, 0.968,&
!log10(nu) 0.000   CosSol= 0.100     Salb= 0.400      Min=-0.352      Max= 0.642
 0.069, 0.047, 0.019, 0.015, 0.034, 0.058, 0.081, 0.099, 0.059,&
-0.010,-0.060,-0.078,-0.034,-0.002, 0.017, 0.042, 0.102, 0.232,&
-0.054,-0.127,-0.148,-0.077,-0.037,-0.023,-0.000, 0.077, 0.297,&
-0.085,-0.177,-0.202,-0.109,-0.062,-0.051,-0.030, 0.061, 0.356,&
-0.098,-0.198,-0.226,-0.128,-0.081,-0.073,-0.053, 0.049, 0.389,&
-0.127,-0.248,-0.286,-0.171,-0.119,-0.116,-0.098, 0.028, 0.484,&
-0.156,-0.299,-0.352,-0.224,-0.168,-0.170,-0.154, 0.008, 0.642,&
!log10(nu) 0.301   CosSol= 0.100     Salb= 0.400      Min=-0.187      Max= 0.475
 0.037, 0.011,-0.017,-0.009, 0.014, 0.030, 0.035, 0.024,-0.022,&
-0.017,-0.057,-0.064,-0.028,-0.010,-0.001, 0.013, 0.044, 0.121,&
-0.045,-0.095,-0.094,-0.042,-0.028,-0.026,-0.012, 0.039, 0.187,&
-0.063,-0.122,-0.115,-0.050,-0.037,-0.042,-0.030, 0.034, 0.241,&
-0.071,-0.134,-0.126,-0.058,-0.046,-0.055,-0.043, 0.031, 0.271,&
-0.088,-0.161,-0.152,-0.072,-0.061,-0.076,-0.069, 0.023, 0.352,&
-0.103,-0.187,-0.182,-0.092,-0.079,-0.100,-0.097, 0.016, 0.475,&
!log10(nu) 0.699   CosSol= 0.100     Salb= 0.400      Min=-0.085      Max= 0.255
 0.015,-0.003,-0.018,-0.007, 0.008, 0.013, 0.010,-0.002,-0.027,&
-0.012,-0.032,-0.029,-0.012,-0.005,-0.001, 0.006, 0.018, 0.047,&
-0.025,-0.048,-0.035,-0.014,-0.014,-0.014,-0.003, 0.023, 0.085,&
-0.033,-0.059,-0.040,-0.014,-0.018,-0.022,-0.012, 0.025, 0.118,&
-0.036,-0.064,-0.044,-0.016,-0.022,-0.028,-0.017, 0.025, 0.136,&
-0.044,-0.075,-0.052,-0.019,-0.027,-0.038,-0.030, 0.024, 0.185,&
-0.050,-0.085,-0.062,-0.025,-0.032,-0.047,-0.043, 0.021, 0.255,&
!log10(nu) 1.176   CosSol= 0.100     Salb= 0.400      Min=-0.031      Max= 0.096
 0.005,-0.003,-0.008,-0.002, 0.003, 0.004, 0.002,-0.003,-0.011,&
-0.006,-0.013,-0.010,-0.004,-0.002,-0.000, 0.002, 0.006, 0.015,&
-0.011,-0.019,-0.010,-0.005,-0.006,-0.005,-0.000, 0.009, 0.029,&
-0.014,-0.022,-0.011,-0.004,-0.007,-0.008,-0.003, 0.010, 0.041,&
-0.015,-0.024,-0.012,-0.005,-0.009,-0.010,-0.005, 0.011, 0.049,&
-0.017,-0.027,-0.014,-0.005,-0.010,-0.014,-0.009, 0.012, 0.068,&
-0.020,-0.031,-0.018,-0.007,-0.011,-0.017,-0.015, 0.011, 0.096,&
!log10(nu) 2.000   CosSol= 0.100     Salb= 0.400      Min=-0.012      Max=-0.003
-0.005,-0.007,-0.004,-0.003,-0.004,-0.005,-0.007,-0.009,-0.011,&
-0.005,-0.007,-0.004,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.005,-0.008,-0.005,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.005,-0.008,-0.005,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.005,-0.008,-0.005,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.005,-0.008,-0.005,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.005,-0.008,-0.005,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012/
data atbl (1:9,1:7,1:6,2,3) / &
!log10(nu)-0.301   CosSol= 0.300     Salb= 0.400      Min=-0.136      Max= 1.061
 0.159, 0.150, 0.163, 0.187, 0.189, 0.202, 0.249, 0.333, 0.345,&
 0.110, 0.087, 0.094, 0.128, 0.155, 0.186, 0.257, 0.407, 0.653,&
 0.081, 0.049, 0.045, 0.074, 0.107, 0.143, 0.218, 0.392, 0.746,&
 0.060, 0.019, 0.005, 0.026, 0.061, 0.100, 0.178, 0.373, 0.828,&
 0.052, 0.007,-0.012, 0.002, 0.034, 0.069, 0.146, 0.352, 0.856,&
 0.032,-0.023,-0.057,-0.060,-0.037,-0.009, 0.065, 0.299, 0.947,&
 0.013,-0.053,-0.106,-0.136,-0.132,-0.123,-0.062, 0.210, 1.061,&
!log10(nu) 0.000   CosSol= 0.300     Salb= 0.400      Min=-0.134      Max= 0.635
 0.083, 0.082, 0.088, 0.098, 0.098, 0.102, 0.112, 0.120, 0.066,&
 0.043, 0.027, 0.025, 0.041, 0.058, 0.068, 0.085, 0.134, 0.238,&
 0.022,-0.002,-0.013, 0.001, 0.021, 0.031, 0.049, 0.115, 0.304,&
 0.008,-0.022,-0.041,-0.032,-0.008, 0.003, 0.022, 0.105, 0.370,&
 0.002,-0.031,-0.054,-0.049,-0.028,-0.021,-0.003, 0.090, 0.395,&
-0.011,-0.051,-0.084,-0.089,-0.072,-0.069,-0.051, 0.067, 0.488,&
-0.023,-0.069,-0.114,-0.134,-0.126,-0.133,-0.118, 0.037, 0.635,&
!log10(nu) 0.301   CosSol= 0.300     Salb= 0.400      Min=-0.082      Max= 0.427
 0.050, 0.049, 0.049, 0.049, 0.047, 0.047, 0.042, 0.024,-0.029,&
 0.022, 0.011, 0.006, 0.014, 0.021, 0.020, 0.022, 0.040, 0.096,&
 0.009,-0.007,-0.018,-0.009, 0.002,-0.001, 0.001, 0.036, 0.155,&
 0.001,-0.020,-0.035,-0.026,-0.011,-0.014,-0.011, 0.036, 0.207,&
-0.002,-0.025,-0.043,-0.036,-0.022,-0.027,-0.025, 0.031, 0.232,&
-0.010,-0.036,-0.060,-0.058,-0.043,-0.050,-0.047, 0.026, 0.307,&
-0.016,-0.047,-0.077,-0.082,-0.070,-0.080,-0.076, 0.023, 0.427,&
!log10(nu) 0.699   CosSol= 0.300     Salb= 0.400      Min=-0.038      Max= 0.217
 0.023, 0.022, 0.020, 0.018, 0.017, 0.017, 0.011,-0.003,-0.030,&
 0.009, 0.003,-0.001, 0.003, 0.006, 0.003, 0.005, 0.013, 0.035,&
 0.003,-0.006,-0.012,-0.005,-0.001,-0.007,-0.004, 0.016, 0.069,&
-0.000,-0.011,-0.019,-0.012,-0.004,-0.011,-0.010, 0.018, 0.098,&
-0.002,-0.014,-0.023,-0.016,-0.008,-0.017,-0.015, 0.017, 0.113,&
-0.005,-0.019,-0.031,-0.025,-0.016,-0.024,-0.024, 0.017, 0.155,&
-0.008,-0.023,-0.038,-0.034,-0.026,-0.035,-0.034, 0.017, 0.217,&
!log10(nu) 1.176   CosSol= 0.300     Salb= 0.400      Min=-0.014      Max= 0.081
 0.008, 0.008, 0.007, 0.005, 0.005, 0.005, 0.002,-0.003,-0.012,&
 0.003, 0.000,-0.002, 0.001, 0.001, 0.000, 0.002, 0.004, 0.011,&
 0.001,-0.003,-0.006,-0.002,-0.001,-0.003,-0.001, 0.006, 0.024,&
-0.001,-0.005,-0.008,-0.004,-0.001,-0.005,-0.003, 0.008, 0.034,&
-0.001,-0.006,-0.009,-0.005,-0.003,-0.007,-0.005, 0.008, 0.041,&
-0.002,-0.008,-0.012,-0.008,-0.005,-0.009,-0.009, 0.008, 0.057,&
-0.003,-0.009,-0.014,-0.011,-0.008,-0.013,-0.012, 0.008, 0.081,&
!log10(nu) 2.000   CosSol= 0.300     Salb= 0.400      Min=-0.012      Max=-0.002
-0.002,-0.003,-0.005,-0.004,-0.004,-0.005,-0.007,-0.009,-0.010,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.005,-0.007,-0.009,-0.011,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.005,-0.007,-0.009,-0.011,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.002,-0.003,-0.005,-0.004,-0.004,-0.005,-0.007,-0.009,-0.012/
data atbl (1:9,1:7,1:6,3,3) / &
!log10(nu)-0.301   CosSol= 0.500     Salb= 0.400      Min=-0.060      Max= 0.882
 0.124, 0.134, 0.144, 0.160, 0.176, 0.199, 0.249, 0.334, 0.348,&
 0.119, 0.110, 0.114, 0.133, 0.157, 0.190, 0.258, 0.399, 0.619,&
 0.109, 0.091, 0.090, 0.105, 0.127, 0.156, 0.223, 0.381, 0.691,&
 0.099, 0.076, 0.070, 0.080, 0.097, 0.121, 0.185, 0.357, 0.751,&
 0.097, 0.071, 0.061, 0.067, 0.078, 0.095, 0.155, 0.332, 0.765,&
 0.089, 0.056, 0.039, 0.035, 0.030, 0.031, 0.078, 0.269, 0.819,&
 0.082, 0.041, 0.015,-0.004,-0.032,-0.060,-0.038, 0.169, 0.882,&
!log10(nu) 0.000   CosSol= 0.500     Salb= 0.400      Min=-0.116      Max= 0.521
 0.059, 0.074, 0.085, 0.098, 0.108, 0.117, 0.129, 0.139, 0.088,&
 0.049, 0.049, 0.053, 0.065, 0.077, 0.085, 0.101, 0.145, 0.233,&
 0.041, 0.034, 0.033, 0.040, 0.047, 0.050, 0.063, 0.121, 0.284,&
 0.034, 0.024, 0.019, 0.022, 0.024, 0.022, 0.034, 0.104, 0.335,&
 0.032, 0.019, 0.012, 0.011, 0.008, 0.000, 0.008, 0.085, 0.350,&
 0.027, 0.009,-0.004,-0.012,-0.026,-0.046,-0.045, 0.050, 0.417,&
 0.022,-0.000,-0.019,-0.037,-0.066,-0.104,-0.116, 0.002, 0.521,&
!log10(nu) 0.301   CosSol= 0.500     Salb= 0.400      Min=-0.081      Max= 0.363
 0.035, 0.044, 0.051, 0.058, 0.061, 0.060, 0.054, 0.034,-0.020,&
 0.027, 0.026, 0.028, 0.033, 0.036, 0.033, 0.031, 0.043, 0.087,&
 0.021, 0.017, 0.014, 0.017, 0.017, 0.011, 0.009, 0.036, 0.137,&
 0.017, 0.010, 0.005, 0.005, 0.004,-0.004,-0.005, 0.034, 0.183,&
 0.016, 0.008, 0.001,-0.002,-0.007,-0.018,-0.020, 0.026, 0.201,&
 0.013, 0.002,-0.008,-0.016,-0.026,-0.043,-0.046, 0.016, 0.264,&
 0.010,-0.004,-0.017,-0.030,-0.048,-0.075,-0.081, 0.002, 0.363,&
!log10(nu) 0.699   CosSol= 0.500     Salb= 0.400      Min=-0.036      Max= 0.187
 0.016, 0.020, 0.023, 0.025, 0.025, 0.022, 0.015,-0.000,-0.028,&
 0.012, 0.011, 0.011, 0.013, 0.013, 0.008, 0.007, 0.012, 0.029,&
 0.009, 0.007, 0.005, 0.005, 0.005,-0.001,-0.002, 0.013, 0.059,&
 0.007, 0.004, 0.001, 0.000,-0.001,-0.007,-0.007, 0.015, 0.084,&
 0.007, 0.002,-0.002,-0.003,-0.005,-0.013,-0.013, 0.013, 0.096,&
 0.005,-0.000,-0.006,-0.009,-0.014,-0.023,-0.023, 0.012, 0.132,&
 0.004,-0.002,-0.010,-0.015,-0.023,-0.035,-0.036, 0.010, 0.187,&
!log10(nu) 1.176   CosSol= 0.500     Salb= 0.400      Min=-0.013      Max= 0.069
 0.006, 0.007, 0.008, 0.009, 0.008, 0.007, 0.003,-0.002,-0.012,&
 0.004, 0.004, 0.003, 0.004, 0.004, 0.002, 0.002, 0.004, 0.009,&
 0.003, 0.002, 0.001, 0.001, 0.001,-0.001,-0.001, 0.005, 0.020,&
 0.002, 0.001,-0.000,-0.001,-0.001,-0.003,-0.003, 0.006, 0.030,&
 0.002, 0.000,-0.001,-0.002,-0.002,-0.005,-0.005, 0.006, 0.035,&
 0.002,-0.000,-0.003,-0.004,-0.005,-0.008,-0.008, 0.006, 0.049,&
 0.001,-0.001,-0.004,-0.006,-0.008,-0.013,-0.012, 0.006, 0.069,&
!log10(nu) 2.000   CosSol= 0.500     Salb= 0.400      Min=-0.012      Max=-0.001
-0.001,-0.001,-0.002,-0.003,-0.004,-0.005,-0.007,-0.009,-0.010,&
-0.001,-0.001,-0.002,-0.003,-0.004,-0.005,-0.007,-0.009,-0.011,&
-0.001,-0.001,-0.002,-0.003,-0.004,-0.005,-0.007,-0.009,-0.011,&
-0.001,-0.001,-0.002,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.001,-0.001,-0.002,-0.003,-0.004,-0.005,-0.007,-0.009,-0.011,&
-0.001,-0.001,-0.002,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012,&
-0.001,-0.001,-0.002,-0.003,-0.004,-0.005,-0.007,-0.009,-0.012/
data atbl (1:9,1:7,1:6,4,3) / &
!log10(nu)-0.301   CosSol= 0.900     Salb= 0.400      Min=-0.282      Max= 0.507
-0.282, 0.034, 0.127, 0.140, 0.141, 0.164, 0.219, 0.304, 0.324,&
 0.138, 0.220, 0.210, 0.177, 0.157, 0.169, 0.224, 0.337, 0.494,&
 0.249, 0.284, 0.245, 0.188, 0.152, 0.151, 0.193, 0.304, 0.506,&
 0.318, 0.326, 0.264, 0.194, 0.145, 0.132, 0.160, 0.266, 0.507,&
 0.366, 0.342, 0.269, 0.195, 0.137, 0.114, 0.133, 0.233, 0.491,&
 0.431, 0.378, 0.292, 0.198, 0.122, 0.076, 0.067, 0.153, 0.461,&
 0.490, 0.414, 0.312, 0.199, 0.103, 0.024,-0.025, 0.039, 0.422,&
!log10(nu) 0.000   CosSol= 0.900     Salb= 0.400      Min=-0.190      Max= 0.253
-0.190, 0.005, 0.075, 0.093, 0.100, 0.113, 0.135, 0.155, 0.116,&
 0.059, 0.119, 0.126, 0.110, 0.093, 0.090, 0.101, 0.133, 0.194,&
 0.125, 0.157, 0.147, 0.114, 0.082, 0.063, 0.060, 0.092, 0.198,&
 0.166, 0.184, 0.160, 0.117, 0.074, 0.042, 0.027, 0.059, 0.205,&
 0.188, 0.189, 0.160, 0.115, 0.065, 0.024, 0.001, 0.030, 0.197,&
 0.223, 0.209, 0.173, 0.115, 0.051,-0.009,-0.053,-0.027, 0.196,&
 0.253, 0.228, 0.183, 0.115, 0.037,-0.047,-0.118,-0.101, 0.206,&
!log10(nu) 0.301   CosSol= 0.900     Salb= 0.400      Min=-0.109      Max= 0.181
-0.109, 0.001, 0.044, 0.059, 0.064, 0.068, 0.067, 0.051, 0.000,&
 0.030, 0.067, 0.074, 0.065, 0.051, 0.041, 0.036, 0.041, 0.071,&
 0.066, 0.088, 0.086, 0.066, 0.041, 0.019, 0.008, 0.022, 0.096,&
 0.093, 0.104, 0.096, 0.069, 0.035, 0.004,-0.013, 0.007, 0.118,&
 0.099, 0.105, 0.093, 0.066, 0.028,-0.008,-0.030,-0.007, 0.124,&
 0.117, 0.115, 0.099, 0.066, 0.020,-0.030,-0.062,-0.035, 0.147,&
 0.133, 0.124, 0.105, 0.065, 0.011,-0.052,-0.100,-0.071, 0.181,&
!log10(nu) 0.699   CosSol= 0.900     Salb= 0.400      Min=-0.050      Max= 0.113
-0.048,-0.000, 0.020, 0.028, 0.030, 0.029, 0.022, 0.006,-0.021,&
 0.013, 0.029, 0.034, 0.030, 0.021, 0.013, 0.009, 0.010, 0.022,&
 0.029, 0.038, 0.039, 0.030, 0.015, 0.001,-0.003, 0.007, 0.043,&
 0.049, 0.044, 0.048, 0.033, 0.012,-0.006,-0.012, 0.005, 0.060,&
 0.041, 0.045, 0.041, 0.029, 0.009,-0.012,-0.019, 0.000, 0.067,&
 0.049, 0.049, 0.044, 0.029, 0.005,-0.022,-0.033,-0.009, 0.088,&
 0.057, 0.054, 0.047, 0.029, 0.001,-0.032,-0.050,-0.023, 0.113,&
!log10(nu) 1.176   CosSol= 0.900     Salb= 0.400      Min=-0.017      Max= 0.045
-0.017,-0.000, 0.007, 0.010, 0.011, 0.010, 0.006,-0.000,-0.010,&
 0.005, 0.011, 0.013, 0.011, 0.007, 0.004, 0.002, 0.003, 0.007,&
 0.011, 0.014, 0.014, 0.011, 0.005,-0.001,-0.001, 0.003, 0.015,&
 0.030, 0.015, 0.022, 0.014, 0.004,-0.003,-0.004, 0.003, 0.022,&
 0.015, 0.016, 0.015, 0.011, 0.003,-0.006,-0.007, 0.002, 0.025,&
 0.017, 0.018, 0.016, 0.011, 0.001,-0.009,-0.012,-0.001, 0.034,&
 0.022, 0.019, 0.017, 0.011,-0.000,-0.013,-0.017,-0.005, 0.045,&
!log10(nu) 2.000   CosSol= 0.900     Salb= 0.400      Min=-0.012      Max= 0.007
 0.002, 0.002, 0.001, 0.000,-0.002,-0.005,-0.007,-0.009,-0.010,&
-0.002, 0.002, 0.002, 0.000,-0.002,-0.005,-0.007,-0.009,-0.011,&
 0.003, 0.002, 0.001,-0.000,-0.002,-0.005,-0.007,-0.009,-0.011,&
 0.003, 0.001, 0.002, 0.000,-0.002,-0.005,-0.007,-0.009,-0.012,&
 0.003, 0.002, 0.007, 0.000,-0.002,-0.005,-0.007,-0.009,-0.011,&
 0.000, 0.002, 0.002, 0.000,-0.002,-0.005,-0.007,-0.009,-0.012,&
 0.005, 0.002, 0.001, 0.000,-0.002,-0.005,-0.007,-0.009,-0.012/






contains
!------------------------------------------------------------------------
	subroutine tf_table(n1,n2,ib)
	implicit none
	integer n1,n2,i,ii
	logical ib(n1,n2)
	if(  ncllutinit ) return
	do i=1,n2
	do ii=1,n1
	ib(ii,i)=btest(i-1,ii-1)
	enddo
!	print*,i,ib(1:n1,i)
	enddo
	ncllutinit = .true.
	return
	end subroutine tf_table
!-----------------------------------------------------------------------
	integer function ilui(iva)
	implicit none
	integer i,k
	integer  iva(nv)
	integer  mva(nv)

	mva(1)=nva(1)
	do i=2,nv
	 mva(i)=mva(i-1)*nva(i)
	enddo

	k= iva(1)
	do i=2,nv
	k= k+ (iva(i)-1)*mva(i-1)
	enddo

	ilui=k
	return
	end function ilui
!----------------------------------------------------------------
real function taucorrect(tau,ncl,nu,u0,salb)
implicit none
real,intent(IN)::  tau ,nu,u0,salb
integer,intent(IN):: ncl
	
	real value_table, swx,wx,rmin,rmax,trlui
	integer i,j,ik,k,iv,in
	integer  iva(nv,2**nv)
	
	real wb(nv),wt(nv),rva(nv),val(nv)
	integer ibase(nv),itop(nv)
	
	val(1) =  log(tau)	! Natural Log of Cloud Tau  
	val(2) =  ncl		! # of Model Levels w/clouds
	val(3) =  log10(nu)  ! Shape Factor of Gamma Distribution
	val(4) =  u0		! Cos Solar Zenith Angle
	val(5) =  salb	! Surface Albedo

	 call tf_table(nv,2**nv,ichoose)
!--------------------
	 VSET : do iv=1,nv 
	rmin = anodes(1,iv)
	rmax = anodes(nva(iv),iv)

	if (val(iv) <= rmin )then 
	  rva(iv) = 1
	elseif (val(iv) >= rmax ) then
	  rva(iv) = nva(iv)
	else

	FNODES : do in = 1,nva(iv)-1
	if( val(iv) >= anodes(in,iv) .and. val(iv) < anodes(in+1,iv)) & 
     	rva(iv)= in+( val(iv)-anodes(in,iv)) /                        &
                    (anodes(in+1,iv)-anodes(in,iv))
	enddo FNODES

	endif

!	print*,iv,rva(iv)
	enddo VSET
!---------------------

	 ibase = floor(rva)
	 where( ibase < 1) ibase=1

	 itop= ceiling(rva)
	 where( itop > nva) itop=nva

	wb=1.0-(rva-ibase)
	wt=1.0-wb
	
!	print'(A10,10f5.1)','Exact',rva(1:nv)
!	print'(A10,10I5)','BASE',ibase
!	print'(A10,10I5)','TOP',itop
!	print'(A10,10f5.1)','Wb',wb	
!	print'(A10,10f5.1)','Wt',wt

	swx=0 ; trlui =0 ; ik=0

	NODE : do j=1,2**nv
	wx=1.0

	 DIMENSION: do i=1,nv

	 if( ichoose(i,j) ) then
	  iva(i,j) = itop(i)
	  wx=wx*wt(i)
	 else
	  iva(i,j) = ibase(i)
	  wx=wx*wb(i)
	 endif

	 enddo DIMENSION

	 if( wx > 0 ) then
	 ik=ik+1
	 k = ilui(iva(1,j))

	 value_table = table(k)

	 swx       = swx  +               wx
	 trlui      = trlui + value_table * wx

!	print'(2I4,i10,4f10.5,10I4)',ik,j,k,value_table ,wx,swx,trlui,iva(1:nv,j)
!	if (swx >= 0.9999 )exit
	endif

	enddo NODE
	taucorrect = trlui/swx
	return

	end function taucorrect

END MODULE FU_NU_TAU_NCL
!===============================================================
!USE FU_NU_TAU_NCL, only: taucorrect
!real tau,nu,u0
!integer ncl
!tau = 62
! ncl = 10
!  u0  =0.88
!nu =  1.0
!salb = 0.2
!xcor = taucorrect(tau,ncl,nu,u0,salb)
!print'(f8.4,3x,5f6.2)',xcor ,tau,real(ncl),nu,u0,salb
!end
